<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
namespace Mcm\UserBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Doctrine\ORM\EntityRepository as EntityRepository;
/**
 * Description of selectbonType
 *
 * @author Gael
 */
class selectbonType extends AbstractType {

    protected $repas;

    public function __construct(){
     
         
    }
    
    

    public function buildForm(FormBuilderInterface $builder, array $options) {
        $builder
                ->add('enseigne', 'entity', array(
        'class' => 'McmRepasBundle:Enseigne',
            'property'=>'nom',
        'query_builder' => function(EntityRepository $er) {
                            return $er->createQueryBuilder('e')->orderBy('e.nom', 'ASC');}));
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver) {
       
       
    }

    public function getName() {
        return 'mcm_userbundle_selectbon';
    }

}



?>
